package com.ym.b2b.ws.client;

import java.net.MalformedURLException;

import javax.xml.namespace.QName;

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;

import com.ym.b2b.ws.service.CustomerService;

public class loginTest {

    private static final QName SERVICE_NAME = new QName("http://service.ws.b2b.ym.com/", "ProductWebServiceService");

    public static void main(String[] args) throws MalformedURLException {
        try {
            JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();

            factoryBean.setServiceClass(CustomerService.class);

            factoryBean.setAddress("http://222.175.99.202:1800/admin/ws/customerService?wsdl");

            CustomerService readerService = (CustomerService) factoryBean.create();
            String reader = readerService.login("22", "22");
            // factoryBean.setServiceFactory(sf);
            System.out.println("Reader:" + reader.toString());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
